﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Kelper.Infrastructure.Helpers
{
    public static class IntExtensions
    {
        public static string Pluralize(this int i, string singular, string plural, string none = null)
        {
            none = none ?? plural;

            string result;
            if (i == 0)
                result = none;
            else if (i == 1)
                result = singular;
            else
                result = plural;

            return result.Replace("{0}", i.ToString());
        }
    }
}